package com.service;

import org.springframework.dao.DataAccessException;

import java.util.List;

/**
 * Created by Likuo on 2018/8/24.
 *
 * @Description:
 */
public interface BaseService<T,PK> {
    public T getById(PK id) throws DataAccessException;

    public int save(T entity) throws DataAccessException;

    public int removeById(PK id) throws DataAccessException;

    public int update(T entity) throws DataAccessException;

    public int insertList(List<T> list) throws DataAccessException;

    public List<T> getAllData() throws DataAccessException;

}
